cmake_minimum_required(VERSION 3.20)

project(sfml-example)


add_executable(
    Cycle-run
    Cycle.cpp
)



target_include_directories(Cycle-run
    PUBLIC
    ../3rd/SFML-2.6.1-windows-vc17-64-bit/SFML-2.6.1/include
)

target_link_directories(
    Cycle-run
    PUBLIC
    ../3rd/SFML-2.6.1-windows-vc17-64-bit/SFML-2.6.1/lib
)

target_link_libraries(
    Cycle-run
    sfml-graphics.lib
    sfml-main.lib 
    sfml-audio.lib
    sfml-system.lib
    sfml-window.lib
)

# 正则匹配dll 文件
file(GLOB DLLFILES
../3rd/SFML-2.6.1-windows-vc17-64-bit/SFML-2.6.1/bin/*-2.dll
)
# 复制dll到Debug文件夹
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
file(COPY ${DLLFILES} DESTINATION ./Debug)
endif()
endif()